﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using QRCode.BusinessEntities;

namespace QRCode.BusinessLayer
{
    public class EntitiesContextInitializer:DropCreateDatabaseIfModelChanges<QRCodeContext>
    {
        protected override void Seed(QRCodeContext context)
        {
            context.Administrators.Add(new Administrator { Accounts = "admin", Password = "jZae727K08KaOmKSgOaGzww/XVqGr/PKEgIMkjrcbJI=", CreateTime = DateTime.Now, LoginIP = "::1", LoginTime = null });
            context.SaveChanges();
        }
    }
}
